# Contributor: Justin Berthault <justin.berthault@zaclys.net>
# Maintainer: Justin Berthault <justin.berthault@zaclys.net>
pkgname=blocky
pkgver=0.19
pkgrel=0
pkgdesc="DNS proxy as ad-blocker for local network"
url="https://github.com/0xERR0R/blocky"
license="Apache-2.0"
arch="all"
options="net"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/0xERR0R/blocky/archive/v$pkgver.tar.gz"

build() {
	make VERSION=$pkgver build
}

check() {
	make test
}

package() {
	install -Dm755 "bin/$pkgname" "$pkgdir/usr/bin/$pkgname"

	# blocky will not start if its log directory is missing
	mkdir -p "$pkgdir"/var/log/blocky

}

sha512sums="
8312a1c65fee8dffd466b5f819b3df1739469d4891dba717b5fe8adeedce61adda6532148d2035c38afab4af6d596329105bb14b3763b9c0177dd3e9633f30d2  blocky-0.19.tar.gz
"
